package dominio;

import java.io.Serializable;
import java.util.List;
import javax.persistence.*;

/**
 * @author DEVAIR
 * @version 1.0 @created 02-nov-2013 16:59:06
 */
@Entity
@Table(name = "site")
@SequenceGenerator(name = "siteseq",initialValue=1,allocationSize=1)
@NamedQueries({
    @NamedQuery(name = "filtrosite", query =
    "select e from SiteMd e where LOWER (e.url) like LOWER(:texto) or LOWER(e.descricao) like LOWER(:texto)")    
})
public class SiteMd implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "siteseq")
    @Column(name = "site_id")
    private long id;
    @Column(name = "url", nullable = false)
    private String url;
    @Column(name = "descricao", nullable = false)
    private String descricao;
    @Column(name = "tags")
    private List<String> tags;
    

    /**
     * @return the id
     */
    public long getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(long id) {
        this.id = id;
    }

    /**
     * @return the url
     */
    public String getUrl() {
        return url;
    }

    /**
     * @param url the url to set
     */
    public void setUrl(String url) {
        this.url = url;
    }

    /**
     * @return the descricao
     */
    public String getDescricao() {
        return descricao;
    }

    /**
     * @param descricao the descricao to set
     */
    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    /**
     * @return the tags
     */
    public List<String> getTags() {
        return tags;
    }

    /**
     * @param tags the tags to set
     */
    public void setTags(List<String> tags) {
        this.tags = tags;
    }
    
}